home *** CD-ROM | disk | FTP | other *** search
- /*
- * File: AERequest.h
- *
- * Contains: xxx put contents here xxx
- *
- * Written by: Rick Violet
- *
- * Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
- *
- * Change History (most recent first):
- *
- * <4+> 11/19/92 RV
- * 11/18/92 RV xxx put comment here xxx
- *
- * To Do:
- */
-
- #ifndef __AERequest__
- #define __AERequest__
-
- //class AERequest;
-
- #ifndef __Request__
- #include "Request.h"
- #endif
-
- #ifndef __APPLEEVENTS__
- #include <AppleEvents.h>
- #endif
-
- pascal OSErr
- AERequestHandler( AppleEvent* pMessage, AppleEvent* pReply, long );
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // AERequest class - represents the service request from the V.U. script
- // This request is generated upon receiving a 'v.u.' 'extc' AppleEvent
- //—————————————————————————————————————————————————————————————————————————————————————
- class AERequest : public Request
- {
- AppleEvent fMessage;
- AppleEvent* fMessagePtr;
-
- AppleEvent fReply;
- AppleEvent* fReplyPtr;
-
- Boolean fSuspended;
- AppleEvent fResetTimerMsg;
- Boolean fHaveResetTimerMsg;
- long fReturnID;
-
- Boolean fUseStandardReplyType; //———— standard = AppleScript (also VU 2.1)
-
- public: //———————————————————————
- AERequest( AppleEvent* pMessage, AppleEvent* pReply,
- Boolean pUseModernReplyType = true );
- virtual ~AERequest();
-
- long GetIdentifierOfRequesttoCancel();
-
- static OSErr InstallAppleEventHandler();
-
- void SetErrorCode( OSErr tErr );
- void SetErrorMessage( char* tErrText );
-
- OSErr Initialize();
- OSErr SetupReturnID();
- OSErr SetupSeviceIdentifier();
- OSErr SetupParameterList();
- OSErr SetupRequestIdentifier();
-
- OSErr MakeVUListFromDescList( AEDescList* pDescList,
- VUList** pValue );
-
- void ResetTimeOutCounter( unsigned long pNewTimeOutInterval = kDefaultTimeOutSeconds );
- OSErr SendTimeOutResetMessage( unsigned long pNewTimeOutInterval );
-
- virtual void SendResult();
- virtual OSErr PutReturnValueIntoReplyEvent();
-
- OSErr MakeDescListFromVUList( VUList* pValue,
- AEDescList* pDescList );
-
- /*SBR Hacked this in 12/03/94 for compatibility with VU 2.0.x */
- Boolean UseStandardReplyType() { return fUseStandardReplyType; };
-
- /*SBR Hacked this in 12/03/94 to fix an (alleged) AE Manager bug */
- void FixAEManagerBugPart1();
-
- };
-
-
- #endif
-